var text = '{ "sites" : [' +
'{ "name":"Runoob" , "url":"www.runoob.com" },' +
'{ "name":"Google" , "url":"www.google.com" },' +
'{ "name":"Taobao" , "url":"www.taobao.com" } ]}';

obj = JSON.parse(text);
document.getElementById("name-1").innerHTML = obj.sites[0].name;
document.getElementById("url-1").innerHTML = obj.sites[0].url;
document.getElementById("name-2").innerHTML = obj.sites[1].name;
document.getElementById("url-2").innerHTML = obj.sites[1].url;
document.getElementById("name-3").innerHTML = obj.sites[2].name;
document.getElementById("url-3").innerHTML = obj.sites[2].url;




